package com.mapper;

import com.dao.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper

public interface wx {
    @Select("select * from wxuser where openid = #{openid}")
    wxuser getWxUserByOpenId(String openid);
    @Select("select * from user where openid = #{openid}")
    user getUserByOpenId(String openid);
    @Insert("insert into wxuser values(#{openid},#{skey},#{city},#{province},#{country},#{gender},#{nickname})")
    void insertIntoWxUser(wxuser user);
    @Insert("insert into user(openid,id_number,phone,room_id,name,year,sex,health) values(#{openid},#{id_number},#{phone},#{room_id},#{name},#{year},#{sex},#{health})")
    void insertIntoUser(user user1);
    @Select("select * from inspector where openid = #{openid}")
    inspector getInspectorByOpenId(String openid);
    @Insert("insert into outs(inspector_openid,user_openid,health,times,temp)values(#{inspector_openid},#{user_openid},#{health},#{times},#{temp})")
    void insertIntoOuts(outs outs);

    @Insert("insert into enter(inspector_openid,user_openid,health,times,temp)values(#{inspector_openid},#{user_openid},#{health},#{times},#{temp})")
    void insertIntoEnter(outs outs);

    @Insert("insert into inspector(openid,phone,sex,name) values(#{openid},#{phone},#{sex},#{name})")
    void insertIntoInspector(inspector inspector);

   @Insert("insert into trans_inspector(openid,phone,password,sex,name,checked) values(#{openid},#{phone},#{password},#{sex},#{name},#{checked})")
   void insertIntoTrans_Inspectot(trans_inspector trans);

   @Select("select * from trans_inspector where openid = #{openid}")
   trans_inspector getTrans(String openid);

}
